This repository was archived by the owner on Mar 18, 2024. It is now read-only.
[2023-09-22] wooyeol #240#264
Merged
Merged
Conversation
Closed
limstonestone
approved these changes
Sep 22, 2023
Contributor
limstonestone
left a comment
There was a problem hiding this comment.
저와 풀이가 비슷하신것 같습니당 ㅎㅎ
고생하셨습니다!!
Contributor
There was a problem hiding this comment.
우열님 아래에서 양방향 처리를 해주기 때문에
and ((cur_x, cur_y) not in visited[(prev_x, prev_y)])
부분은 필요가 없는 것 같습니다!!
Contributor
There was a problem hiding this comment.
도현님 말씀처럼 앞의 조건이나 뒤의 조건 중 하나만 써줘도 될 것 같아요 우열님!! 고생하셨습니다~~!!👍👍
zsmalla
approved these changes
Sep 22, 2023
Contributor
zsmalla
left a comment
There was a problem hiding this comment.
해시를 사용해서 지나간 길 체크를 잘 활용하신 것 같습니다! set을 활용해서 길이를 반환하는 것이 정해 같지만 이 방법도 좋은 것 같습니다! 고생하셨습니다 우열님!
Contributor
There was a problem hiding this comment.
위 if-else 구절을 조금만 리팩토링 하면 이 친구도 끼어넣을 수 있을 것 같아요! 그 편이 더 깔끔하다는 생각힙니다!
ksumini
approved these changes
Sep 23, 2023
Contributor
There was a problem hiding this comment.
도현님 말씀처럼 앞의 조건이나 뒤의 조건 중 하나만 써줘도 될 것 같아요 우열님!! 고생하셨습니다~~!!👍👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
방문 길이
https://school.programmers.co.kr/learn/courses/30/lessons/49994
풀이시간
10:50 ~ 11:33 (43분)
문제 조건
1 <= len(dirs) : D <= 500
시간 복잡도 :
O(D * (D + D)) = O(D^2)
접근법
무슨 알고리즘으로 풀이 할 수 있을까? -> 시뮬레이션(해쉬 테이블)